home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / 4dostool / arconv01.zip / TO3.DAT < prev   
Text File  |  1993-06-30  |  2KB  |  89 lines

  1. iff %NEW gt %OLD then
  2.   color bright blink red on black
  3.   echo New file created is bigger than original.
  4.   color white on black
  5. endiff
  6.  
  7. :: Clean up:
  8. move /rq %FILENAME.%ARC ..
  9. del /xyzsq .
  10. cd ..
  11. rd $$$$TEMP.$$1
  12. describe %FILENAME.%ARC "%@DESCRIPT[%FILENAME.%@EXT[%RUN]]"
  13. iff %MAX == TRUE then
  14.   iff %NEW gt %OLD then
  15.     move /q %FILENAME.%@EXT[%RUN] $$$$TEMP.$$2
  16.     %DELETE %FILENAME.%ARC
  17.     return
  18.   endiff
  19. endiff
  20. %DELETE %FILENAME.%@EXT[%RUN]
  21. move /q %FILENAME.%ARC $$$$TEMP.$$2
  22. return
  23.  
  24. :syntax
  25. echos %0 Syntax: [
  26. color bright green on black
  27. echos -max
  28. color white on black
  29. echos ] [
  30. color bright magenta on black
  31. echos -y | -n
  32. color white on black
  33. echos ] [
  34. color bright blue on black
  35. echos arc
  36. color white on black
  37. echos ]
  38. color bright yellow on black
  39. echo  archive-filename...
  40. color white on black
  41. echos Where
  42. color bright blue on black
  43. echos  arc
  44. color white on black
  45. echo  is one of the following: arj zip lzh zoo hpk sqz ha hap arc z hyp wau
  46. echo Default is %DEFAULT.
  47. color bright green on black
  48. echos -max
  49. color white on black
  50. echo  deletes the smaller file after conversion (Default: delete original file).
  51. color bright magenta on black
  52. echos -n
  53. color white on black
  54. echo  Never deletes the original or converted archive.
  55. color bright magenta on black
  56. echos -y
  57. color white on black
  58. echo  Always deletes the chosen file (original or larger archive, with -max).
  59. echo Not giving -y or -n will result in prompting for each deletion.
  60. color bright yellow on black
  61. echos archive-filename
  62. color white on black
  63. echo  is the filename(s) to convert. Accepts wildcards.
  64. echo Note: Order is important!. Give full name for archive-filenames.
  65. echo Example 1: to arj *.zip - will convert all zip archives to arj
  66. echo Example 2: to -max -y zip a.arc b.arj - will convert to zip the files a.arc and
  67. echo - b.arc, deleting the smaller archive each time, without prompting.
  68. echo Check inline documentation for more info.
  69. goto end
  70.  
  71. :restore_order
  72. move /q $$$$TEMP.$$2 . >& NUL
  73. rd $$$$TEMP.$$1 >& NUL
  74. rd $$$$TEMP.$$2 >& NUL
  75. return
  76.  
  77. :end
  78. endlocal
  79. gosub restore_order
  80. quit 0
  81.  
  82. :error
  83. echo.
  84. echo Aborting after error: Check directories $$$$TEMP.$$?
  85. endlocal
  86. gosub restore_order
  87. quit 1
  88.  
  89.